package com.crm.dto;

import io.swagger.annotations.ApiModel;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Map;

@Data
@ApiModel("转派管理分页DTO对象")
public class TransferPageDTO implements Serializable {
    private Long userId;

    private String userName;

    private String phone;

    /**
     * 用来接受前端传入的params参数
     */
    private Map<String, Object> params;
    //开始时间

    private LocalDate beginTime;
    //结束时间

    private LocalDate endTime;

    //分页页码
    private Integer pageNum = 1;
    //分页页码
    private Integer pageSize = 5;

    public void check() {
        if (pageNum <= 0) {
            pageNum = 1;
        }
        if (pageSize <= 0 || pageSize >= 100) {
            pageSize = 10;
        }
    }
}

